From b5781d40c8f9d2934556a0a836d4796aaf677b0d Mon Sep 17 00:00:00 2001 From: Inokentiy Babushkin Date: Wed, 30 Nov 2016 20:04:14 +0100 Subject: [PATCH] Changed another batch of tests to account for new rustc argument order. --- tests/profiles.rs | 10 +++++----- tests/run.rs | 14 +++++++------- tests/rustc.rs | 16 ++++++++-------- tests/test.rs | 12 ++++++------ 4 files changed, 26 insertions(+), 26 deletions(-) diff --git a/tests/profiles.rs b/tests/profiles.rs index eb96e5a80..cc3cf7403 100644 --- a/tests/profiles.rs +++ b/tests/profiles.rs @@ -27,7 +27,7 @@ fn profile_overrides() { assert_that(p.cargo_process("build").arg("-v"), execs().with_status(0).with_stderr(&format!("\ [COMPILING] test v0.0.0 ({url}) -[RUNNING] `rustc src[/]lib.rs --crate-name test --crate-type lib \ +[RUNNING] `rustc --crate-name test src[/]lib.rs --crate-type lib \ -C opt-level=1 \ -C debug-assertions=on \ -C metadata=[..] \ @@ -60,7 +60,7 @@ fn opt_level_override_0() { assert_that(p.cargo_process("build").arg("-v"), execs().with_status(0).with_stderr(&format!("\ [COMPILING] test v0.0.0 ({url}) -[RUNNING] `rustc src[/]lib.rs --crate-name test --crate-type lib \ +[RUNNING] `rustc --crate-name test src[/]lib.rs --crate-type lib \ -g \ -C metadata=[..] \ --out-dir [..] \ @@ -90,7 +90,7 @@ fn check_opt_level_override(profile_level: &str, rustc_level: &str) { assert_that(p.cargo_process("build").arg("-v"), execs().with_status(0).with_stderr(&format!("\ [COMPILING] test v0.0.0 ({url}) -[RUNNING] `rustc src[/]lib.rs --crate-name test --crate-type lib \ +[RUNNING] `rustc --crate-name test src[/]lib.rs --crate-type lib \ -C opt-level={level} \ -g \ -C debug-assertions=on \ @@ -159,7 +159,7 @@ fn top_level_overrides_deps() { assert_that(p.cargo_process("build").arg("-v").arg("--release"), execs().with_status(0).with_stderr(&format!("\ [COMPILING] foo v0.0.0 ({url}/foo) -[RUNNING] `rustc foo[/]src[/]lib.rs --crate-name foo \ +[RUNNING] `rustc --crate-name foo foo[/]src[/]lib.rs \ --crate-type dylib --crate-type rlib -C prefer-dynamic \ -C opt-level=1 \ -g \ @@ -168,7 +168,7 @@ fn top_level_overrides_deps() { --emit=dep-info,link \ -L dependency={dir}[/]target[/]release[/]deps` [COMPILING] test v0.0.0 ({url}) -[RUNNING] `rustc src[/]lib.rs --crate-name test --crate-type lib \ +[RUNNING] `rustc --crate-name test src[/]lib.rs --crate-type lib \ -C opt-level=1 \ -g \ -C metadata=[..] \ diff --git a/tests/run.rs b/tests/run.rs index ce007bef6..095f6dc98 100644 --- a/tests/run.rs +++ b/tests/run.rs @@ -227,8 +227,8 @@ fn specify_name() { execs().with_status(0) .with_stderr(&format!("\ [COMPILING] foo v0.0.1 ({dir}) -[RUNNING] `rustc src[/]lib.rs [..]` -[RUNNING] `rustc src[/]bin[/]a.rs [..]` +[RUNNING] `rustc [..] src[/]lib.rs [..]` +[RUNNING] `rustc [..] src[/]bin[/]a.rs [..]` [FINISHED] debug [unoptimized + debuginfo] target(s) in [..] [RUNNING] `target[/]debug[/]a[EXE]`", dir = path2url(p.root()))) .with_stdout("\ @@ -239,7 +239,7 @@ hello a.rs execs().with_status(0) .with_stderr("\ [COMPILING] foo v0.0.1 ([..]) -[RUNNING] `rustc src[/]bin[/]b.rs [..]` +[RUNNING] `rustc [..] src[/]bin[/]b.rs [..]` [FINISHED] debug [unoptimized + debuginfo] target(s) in [..] [RUNNING] `target[/]debug[/]b[EXE]`") .with_stdout("\ @@ -416,14 +416,14 @@ fn example_with_release_flag() { execs().with_status(0) .with_stderr(&format!("\ [COMPILING] bar v0.0.1 ({url}/bar) -[RUNNING] `rustc bar[/]src[/]bar.rs --crate-name bar --crate-type lib \ +[RUNNING] `rustc --crate-name bar bar[/]src[/]bar.rs --crate-type lib \ -C opt-level=3 \ -C metadata=[..] \ --out-dir {dir}[/]target[/]release[/]deps \ --emit=dep-info,link \ -L dependency={dir}[/]target[/]release[/]deps` [COMPILING] foo v0.0.1 ({url}) -[RUNNING] `rustc examples[/]a.rs --crate-name a --crate-type bin \ +[RUNNING] `rustc --crate-name a examples[/]a.rs --crate-type bin \ -C opt-level=3 \ -C metadata=[..] \ --out-dir {dir}[/]target[/]release[/]examples \ @@ -444,14 +444,14 @@ fast2")); execs().with_status(0) .with_stderr(&format!("\ [COMPILING] bar v0.0.1 ({url}/bar) -[RUNNING] `rustc bar[/]src[/]bar.rs --crate-name bar --crate-type lib \ +[RUNNING] `rustc --crate-name bar bar[/]src[/]bar.rs --crate-type lib \ -g \ -C metadata=[..] \ --out-dir {dir}[/]target[/]debug[/]deps \ --emit=dep-info,link \ -L dependency={dir}[/]target[/]debug[/]deps` [COMPILING] foo v0.0.1 ({url}) -[RUNNING] `rustc examples[/]a.rs --crate-name a --crate-type bin \ +[RUNNING] `rustc --crate-name a examples[/]a.rs --crate-type bin \ -g \ -C metadata=[..] \ --out-dir {dir}[/]target[/]debug[/]examples \ diff --git a/tests/rustc.rs b/tests/rustc.rs index b8475e16f..f2c99dd46 100644 --- a/tests/rustc.rs +++ b/tests/rustc.rs @@ -27,7 +27,7 @@ fn build_lib_for_foo() { .with_status(0) .with_stderr(format!("\ [COMPILING] foo v0.0.1 ({url}) -[RUNNING] `rustc src[/]lib.rs --crate-name foo --crate-type lib -g \ +[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib -g \ -C metadata=[..] \ --out-dir [..] \ --emit=dep-info,link \ @@ -56,7 +56,7 @@ fn lib() { .with_status(0) .with_stderr(format!("\ [COMPILING] foo v0.0.1 ({url}) -[RUNNING] `rustc src[/]lib.rs --crate-name foo --crate-type lib -g \ +[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib -g \ -C debug-assertions=off \ -C metadata=[..] \ --out-dir [..] \ @@ -86,12 +86,12 @@ fn build_main_and_allow_unstable_options() { .with_status(0) .with_stderr(&format!("\ [COMPILING] {name} v{version} ({url}) -[RUNNING] `rustc src[/]lib.rs --crate-name {name} --crate-type lib -g \ +[RUNNING] `rustc --crate-name {name} src[/]lib.rs --crate-type lib -g \ -C metadata=[..] \ --out-dir [..] \ --emit=dep-info,link \ -L dependency={dir}[/]target[/]debug[/]deps` -[RUNNING] `rustc src[/]main.rs --crate-name {name} --crate-type bin -g \ +[RUNNING] `rustc --crate-name {name} src[/]main.rs --crate-type bin -g \ -C debug-assertions \ -C metadata=[..] \ --out-dir [..] \ @@ -151,10 +151,10 @@ fn build_with_args_to_one_of_multiple_binaries() { .with_status(0) .with_stderr(format!("\ [COMPILING] foo v0.0.1 ({url}) -[RUNNING] `rustc src[/]lib.rs --crate-name foo --crate-type lib -g \ +[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib -g \ -C metadata=[..] \ --out-dir [..]` -[RUNNING] `rustc src[/]bin[/]bar.rs --crate-name bar --crate-type bin -g \ +[RUNNING] `rustc --crate-name bar src[/]bin[/]bar.rs --crate-type bin -g \ -C debug-assertions [..]` [FINISHED] debug [unoptimized + debuginfo] target(s) in [..] ", url = p.url()))); @@ -207,10 +207,10 @@ fn build_with_args_to_one_of_multiple_tests() { .with_status(0) .with_stderr(format!("\ [COMPILING] foo v0.0.1 ({url}) -[RUNNING] `rustc src[/]lib.rs --crate-name foo --crate-type lib -g \ +[RUNNING] `rustc --crate-name foo src[/]lib.rs --crate-type lib -g \ -C metadata=[..] \ --out-dir [..]` -[RUNNING] `rustc tests[/]bar.rs --crate-name bar -g \ +[RUNNING] `rustc --crate-name bar tests[/]bar.rs -g \ -C debug-assertions [..]--test[..]` [FINISHED] debug [unoptimized + debuginfo] target(s) in [..] ", url = p.url()))); diff --git a/tests/test.rs b/tests/test.rs index 8d058dc55..6166a1ec6 100644 --- a/tests/test.rs +++ b/tests/test.rs @@ -128,7 +128,7 @@ fn cargo_test_verbose() { assert_that(p.cargo_process("test").arg("-v").arg("hello"), execs().with_stderr(format!("\ [COMPILING] foo v0.5.0 ({url}) -[RUNNING] `rustc src[/]foo.rs [..]` +[RUNNING] `rustc [..] src[/]foo.rs [..]` [FINISHED] debug [unoptimized + debuginfo] target(s) in [..] [RUNNING] `[..]target[/]debug[/]deps[/]foo-[..][EXE] hello`", url = p.url())) .with_stdout(" @@ -1587,7 +1587,7 @@ fn example_with_dev_dep() { [..] [..] [..] -[RUNNING] `rustc [..] --crate-name ex [..] --extern a=[..]` +[RUNNING] `rustc --crate-name ex [..] --extern a=[..]` [FINISHED] debug [unoptimized + debuginfo] target(s) in [..] ")); } @@ -2058,8 +2058,8 @@ fn bin_does_not_rebuild_tests() { execs().with_status(0) .with_stderr("\ [COMPILING] foo v0.0.1 ([..]) -[RUNNING] `rustc src[/]main.rs [..]` -[RUNNING] `rustc src[/]main.rs [..]` +[RUNNING] `rustc [..] src[/]main.rs [..]` +[RUNNING] `rustc [..] src[/]main.rs [..]` [FINISHED] debug [unoptimized + debuginfo] target(s) in [..] ")); } @@ -2120,8 +2120,8 @@ fn selective_test_optional_dep() { .arg("--features").arg("a").arg("-p").arg("a"), execs().with_status(0).with_stderr("\ [COMPILING] a v0.0.1 ([..]) -[RUNNING] `rustc a[/]src[/]lib.rs [..]` -[RUNNING] `rustc a[/]src[/]lib.rs [..]` +[RUNNING] `rustc [..] a[/]src[/]lib.rs [..]` +[RUNNING] `rustc [..] a[/]src[/]lib.rs [..]` [FINISHED] debug [unoptimized + debuginfo] target(s) in [..] ")); } -- 2.30.2